/* 主页面样式 */


/* 设置顶部导航外部容器样式 */

.topnav-wrapper {
    width: 100%;
    height: 40px;
    line-height: 40px;
    background-color: #333;
}


/* 设置顶部左侧导航样式 */

.top-service,
.topnav li {
    float: left;
}


/* 设置顶部右侧导航样式 */

.shop-cart,
.user-info {
    float: right;
}


/* 设置顶部导航栏超链接样式 */

.topnav a {
    font-size: 14px;
    color: #b0b0b0;
    display: block;
}

.topnav a:hover {
    color: white;
}


/*  顶部导航栏分割线样式 */

.topnav .line {
    font-size: 14px;
    color: #424242;
    margin: 0 8px;
}


/*  顶部导航栏购物车样式 */

.shop-cart a {
    width: 120px;
    background-color: #424242;
    text-align: center;
}

.shop-cart {
    margin-left: 25px;
    position: relative;
    z-index: 9999;
}

.shop-cart:hover a {
    background-color: #fff;
    color: #FF6A00;

}

/* 购物车下拉效果 */

.shop-cartinfo {
    /* display: none; */
    width: 320px;
    height: 0px;
    background-color: #fff;
    box-shadow: 0px 3px 5px rgba(80, 79, 79, 0.2);
    position: absolute;
    text-align: center;
    left: -200px;
    overflow: hidden;
    transition: height 0.3s;
    z-index: 9999;
}

.shop-cartinfo span {
    line-height: 100px;
    width: 320px;
    color: #000;
}

.shop-cart:hover .shop-cartinfo {
    height: 100px;
    display: block;

}

/* app下拉二维码的三角形 */
/* .app-wrapper:hover> .app::after */
.app::after {
    content: '';
    width: 0;
    height: 0;
    display: none;
    /* 设置绝对定位就脱离文档流了，就不用设置display了 ,就不会在父元素中占据位置了*/
    position: absolute;
    border: 8px solid transparent;
    border-top: none;
    border-bottom-color: #fff;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
}

.app:hover .qrcode,
.app:hover::after {
    height: 148px;
    display: block;
}

.app {
    position: relative;
}

/* app下拉二维码 */
.app .qrcode {
    /* display: none; */
    position: absolute;
    left: -38px;
    width: 124px;
    /* height: 148px; */
    height: 0;
    overflow: hidden;
    background-color: #fff;
    line-height: 1;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, .2);
    /*  transition用于为样式设置过渡效果*/
    transition: height 0.3s;
    z-index: 9999;
}

/* 设置二维码图片 */
.app .qrcode img {
    margin: 17px;
    width: 90px;
    margin-bottom: 10px;
}

/* 二维码文字 */
.app .qrcode span {
    color: #000;
}

/* 头部导航条 */
.header-wrapper {

    position: relative;
}

.header-nav {
    height: 100px;

}

/* 头部导航条左侧logo样式 */
.header-nav .logo {
    float: left;
    margin-top: 22.5px;
    width: 55px;
    height: 55px;
    position: relative;
    overflow: hidden;
    /* 隐藏文字 */
    text-indent: -9999px;
}

.header-nav .logo a {
    position: absolute;
    display: block;
    width: 55px;
    height: 55px;
    left: 0;
    background-color: #ff6700;
    background-image: url('../img/logo.png');
    background-position: center;
    transition: left 0.1s;
}

.header-nav .logo .home {
    background-image: url('../img/home.png');
    left: -55px;
}

.header-nav .logo:hover .mi {
    left: 55px;
}

.header-nav .logo:hover .home {
    left: 0;
}

/* 头部中间导航区样式 */
.middle-nav .nav {
    float: left;
    /* background-color: skyblue; */
    padding-left: 67px;
    height: 100px;
}

.allgoods-list {
    position: relative;

}

.left-menu {
    width: 234px;
    height: 420px;
    background-color: rgba(162, 160, 160, 0.6);
    position: absolute;
    left: -122px;
    float: left;
    z-index: 999;
    line-height: 1;
    padding: 20px 0;

}

ul.left-menu li a {
    height: 42px;
    line-height: 42px;
    display: block;
    color: white;
    margin-right: 0;
    padding: 0 30px;
    font-size: 14px;
}

ul.left-menu li:hover a {
    background-color: #FF6A00;
    color: white;
}

ul.left-menu a i {
    float: right;
    color: white;
    line-height: 42px;
}

.nav>li {
    float: left;
    line-height: 100px;
    font-size: 16px;
}


.allgoods {
    visibility: hidden;
}

.middle-nav a {
    display: block;
    margin-right: 20px;
    color: #333;
}

.middle-nav li a:hover {
    color: #FF6A00;
    display: block;
}

.goods-info {
    width: 100%;
    height: 0;
    /* BFC去掉高度塌陷 */
    overflow: hidden;
    /* background-color: violet; */
    position: absolute;
    top: 100px;
    left: 0;
    transition: height 0.3s;
    /* 设置层级 */
    z-index: 9999;
}

/* :not(:first-of-type):not(:nth-child(9)):not(:nth-child(10)) */
.middle-nav .showgoods:hover~.goods-info,
.goods-info:hover {
    background-color: white;
    height: 260px;
    border-top: 1px solid #cecece;
    box-shadow: 0 3px 5px rgba(80, 79, 79, 0.4);
}

/* 右侧搜索框样式 */
.search-wrapper {
    width: 296px;
    height: 50px;
    background-color: violet;
    float: right;
    border: 1px solid rgb(224, 224, 224);
    margin-top: 25px;

}

/* 设置输入框获取焦点事件 */
.search-wrapper .search-inp:focus,
.search-wrapper .search-inp:focus~.search-btn {
    border-color: #ff6700;

}

.search-wrapper .search-inp:focus+div {
    display: block;
    height: 242px;
    z-index: 99;
}


.search-wrapper .search-btn {
    float: left;
    height: 50px;
    width: 52px;
    background-color: white;
    padding: 0;
    border: 1px solid rgb(224, 224, 224);
    border-left: none;
    /* 取消自带的边框 */
    outline: none;

}

.search-wrapper .search-inp {
    float: left;
    height: 50px;
    width: 244px;
    padding: 0 10px;
    font-size: 14px;
    box-sizing: border-box;
    border: 1px solid rgb(224, 224, 224);
    outline: none;
    position: relative;
}

.search-wrapper .search-btn:hover {
    background-color: #ff6700;
    color: white;
    border: none;
}

.search-wrapper .search-btn i {
    color: #616161;
    font-size: 24px;
}

.search-wrapper .search-text {
    width: 242px;
    height: 242px;
    background-color: white;
    border: 1px solid #ff6700;
    position: absolute;
    top: 75px;
    display: none;
    
    overflow: hidden;

}

/* 轮播图部分 */
.banner {
    height: 460px;
    position: relative;
    z-index: 1;
}

.banner .img-list li {
    position: absolute;
}

.banner img {
    width: 100%;
    vertical-align: top;
}

.marks {
    z-index: 9999;
    position: absolute;
    bottom: 22px;
    right: 35px;
}

.marks a {
    float: left;
    width: 6px;
    height: 6px;
    background-color: rgba(39, 190, 228, 0.4);
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.4);
    margin-left: 6px;
}

.marks a:hover,
.marks a.active {
    background-color: rgba(255, 255, 255, 0.4);
    border: 3px solid rgba(0, 0, 0, 0.4);
}

.arrows a {
    width: 41px;
    height: 69px;
    background-image: url(../img/icon-slides.png);
    position: absolute;
    bottom: 0;
    top: 0;
    margin: auto;
}

.arrows .first {
    left: 234px;
    background-position: -84px 0;
}

.arrows .first:hover {
    background-position: 0 0;
}

.arrows .next {
    right: 0;
    background-position: -125px 0;
}

.arrows .next:hover {
    background-position: -42px 0;
}

/* 回到顶部工具栏 */
.to-top {
    width: 26px;
    height: 206px;
    background-color: rgb(163, 162, 162);
    /* 开启固定定位 */
    position: fixed;
    bottom: 60px;
    right: 50%;
    /* 将right值设置为视口宽度的50% */
    margin-right: -639px;
}

/* 布局的等式
   left + right-left + width +margin-right +right =视口的宽度
   auto + 0 + 26 + 0 + 60=视口的宽度
   auto + 0 + 26 + 0 + 50%=视口的宽度
    */

/* ad区域 */
.ad .shortcard {
    width: 234px;
    height: 168px;
    margin-top: 14px;
    background-color: #5f5750;
    margin-right: 14px;
    padding-top: 2px;
}

.ad .shortcard a {
    display: block;
    color: #cfccca;
    text-align: center;
    width: 76px;
    height: 84px;
    font-size: 12px;
    overflow: hidden;
}

.ad .shortcard a:hover {
    color: white;
}

.ad .shortcard i {
    display: block;
    margin-top: 20px;
    font-size: 20px;
}

.ad .shortcard li {
    position: relative;
}

/* 设置上边框 */
.ad .shortcard li::before {
    content: '';
    position: absolute;
    width: 64px;
    height: 1px;
    left: 0;
    right: 0;
    top: 0;
    margin-left: 9px;
    background-color: #665e57;
}

/* 设置左边框 */
.ad .shortcard li::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 0;
    width: 1px;
    height: 70px;
    margin: 0 auto;
    margin-left: 3px;
    background-color: #665e57;
}

.ad .ad-img li {
    width: 316px;
    height: 170px;
    margin-right: 15px;
    margin-top: 14px;
}

.ad .ad-img img {
    width: 100%;
    vertical-align: top;
}

.ad .ad-img li:last-child {
    margin-right: 0;
}

.ad .shortcard,
.ad .ad-img,
.ad li {
    float: left;
}